package sartoservicesync.entities.presta;

import javax.xml.bind.annotation.XmlRootElement;

import org.eclipse.persistence.oxm.annotations.XmlPath;

import sartoservicesync.entities.presta.wrapper.PrestaProductWrapper;
import sartoservicesync.entities.presta.wrapper.PrestaProductsWrapper;
import sartoservicesync.entities.presta.wrapper.PrestaMultiObjectWrapper;
import sartoservicesync.entities.presta.wrapper.PrestaSingleObjectWrapper;

@XmlRootElement
public class PrestaProduct extends PrestaEntity{
	public static final String FIELDS = "id,id_manufacturer,id_supplier,id_category_default,description,ean13,meta_description";

	private String id;
	private String id_manufacturer;
	private String id_supplier;
	private String id_category_default;
	@XmlPath("description/language[@id='1']/text()")
	private String description;
	private String ean13;

	@XmlPath("description_short/language[@id='1']/text()")
	private String shortDescription;

	public String getShortDescription() {
		return shortDescription;
	}

	public void setShortDescription(String shortDescription) {
		this.shortDescription = shortDescription;
	}

	public String getEan13() {
		return ean13;
	}

	public void setEan13(String ean13) {
		this.ean13 = ean13;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getId_manufacturer() {
		return id_manufacturer;
	}

	public void setId_manufacturer(String id_manufacturer) {
		this.id_manufacturer = id_manufacturer;
	}

	public String getId_supplier() {
		return id_supplier;
	}

	public void setId_supplier(String id_supplier) {
		this.id_supplier = id_supplier;
	}

	public String getId_category_default() {
		return id_category_default;
	}

	public void setId_category_default(String id_category_default) {
		this.id_category_default = id_category_default;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Override
	public String toString() {
		return "PrestaProduct [id=" + id + ", shortDescription="
				+ shortDescription + ", ean13=" + ean13 + ", id_supplier="
				+ id_supplier + ", id_manufacturer=" + id_manufacturer +", description="
						+ description + "]";
	}

	@Override
	public PrestaMultiObjectWrapper getMultiObjectWrapper() {
		return new PrestaProductsWrapper();
	}

	@Override
	public PrestaSingleObjectWrapper getSingleObjectWrapper() {
		return new PrestaProductWrapper();
	}

}
